﻿<h1>How To Create A New NuGet Package Version</h1>

<h2>The Disco.Web.ClientLibrary nuget package</h2>

<ol>
<li>Make sure the current <em>Disco.Ontology</em> assembly is build.</li>
<li>Start the <em>Disco.Web.Api</em> project with ctrl+F5.</li>
<li>Check-out the <code>disco.ontology.js</code> and <code>disco.ontology.d.ts</code> file.</li>
<li>Run <code>JaySvcUtil.exe -m http://localhost:50256/api/odata/ -o disco.ontology.js</code> to generate the new javascript file. Of course you can use any other instance of the web api that uses the specific <em>Disco.Ontology</em> assembly that you would like to generate a JayData context for.</li>
<li>Update the typescript code within the <code>disco.ts</code> file according to the current needs.</li>
<li>Compile it to the corresponding <code>disco.js</code> javascript and <code>disco.js.map</code> debug info files.</li>
<li>Update the version tag within the <code>Disco.Web.ClientLibrary.nuspec</code> xml file (the version should reflect the version of the <em>Disco.Ontology</em> assembly that was used to create the <code>disco.ontology.js</code> file)</li>
<li>Run <code>nuget.exe pack Disco.Web.ClientLibrary.nuspec</code> from nuget-pack location to create the package.</li>
<li>Check-in all pending changes...</li>
</ol>

<p>The nuget package will contain the three files: <code>disco.js</code>, <code>disco.js.map</code> and <code>disco.ontology.js</code></p>

<h2>The Disco.Web.ClientLibrary.DefinitelyTyped nuget package</h2>

<ol>
<li>Make sure the TypeScript Definition files <code>disco.d.ts</code> and <code>disco.ontology.d.ts</code> are generated properly. The <code>disco.d.ts</code> file is generated on compile/save of the <code>disco.js</code> file while the <code>disco.ontology.d.ts</code> file is generated solely by the <em>JaySvcUtil.exe</em> commandline tool.</li>
<li>Update the version tag within the <code>Disco.Web.ClientLibrary.DefinitelyTyped.nuspec</code> xml file (the version should reflect the version of the <em>Disco.Ontology</em> assembly that was used to create the <code>disco.ontology.js</code> file)</li>
<li>Run <code>nuget.exe pack Disco.Web.ClientLibrary.DefinitelyTyped.nuspec</code> from nuget-pack location to create the package.</li>
<li>Check-in all pending changes...</li>
</ol>

<p>The nuget package will contain the two files: <code>disco.d.ts</code> and <code>disco.ontology.d.ts</code></p>
